#include "lineageMCMC.h"

#include <iostream>
#include <vector>

using namespace::std;

string ToString(int value)o
{
	stringstream ss;
	ss << value;
	return ss.str();
}

int main(int argc, char* argv[])
{
	int i;	
	cout<<"Hi"<<endl;
	for (i = 0; i<argc; i++)
	{
		cout<<argv[i]<<" ";
	}
	cout<<endl;
	string data_file = argv[1];

	int num_iter = atoi(argv[2]), inc = atoi(argv[3]), num_lin = atoi(argv[4]); 
	double max_val = -1e300;

	string out_file = argv[5];		

	cout<<"Data file:\t\t"<<data_file<<"\n"<<"Number of iterations:\t\t"<<num_iter<<"\nIncrement:\t\t"<<inc<<"\nLineages\t\t"<<num_lin<<"\nOut\t\t"<<out_file<<endl;


	cout<<"Starting..."<<endl;


	lineageMCMC run, best,keep;	
	vector < lineageMCMC > tests;

/*	for (i = 0; i < 10; i++)
	{
		cout<<i<<endl;
		best.initializeModel(data_file,num_lin);

		best.MetropolisHastings(20000, 5000, out_file);	
		if (best.getPosterior() > max_val)
		{
			keep = best;
			max_val = best.getPosterior();
		}
	}*/
//	run.currentLineage.treeT.generateRandomTree(num_lin);
	run.initializeModel(data_file,num_lin);
//	run = keep;
	run.MetropolisHastings(num_iter, inc, out_file);	
//	run.currentLineage = starting_states[best];
//	cout<<run.currentLineage<<endl;
//	run.calculateLogLikelihood(&run.currentLineage, &run.current);

}
